class T_Box_Downloader;

#ifndef T_BOX_DOWNLOADER_H
#define T_BOX_DOWNLOADER_H

#include <QtCore>
#include <QtGui>
#include <QtNetwork>

#include "t_box_video_reply.h"

class T_Box_Downloader : public QObject
{
    Q_OBJECT
protected:
    T_Box_Downloader();

public: /* class methods */
    static void setNAM(QNetworkAccessManager *a_nam);
    static T_Box_Downloader *instance();

public:
    T_Box_Video_Reply *f_last_reply;

public: /* instance methods */
    QNetworkAccessManager *getNAM();
    void checkUrl(QUrl a_url);

public slots:
    void self_on_reply_finished();
    void slot_tray_icon_messageClicked();

protected:
    void handleVideoId(QString a_id);

protected:
    static T_Box_Downloader *fs_T_Box_Downloader;
    static QNetworkAccessManager *fs_QNetworkAccessManager;
    QNetworkAccessManager *f_nam;
    QSystemTrayIcon *f_tray_icon;
};

#endif // T_BOX_DOWNLOADER_H
